Skip to content

Rust: Update rust-analyzer to 0.0.357 - #22776

Open
paldepind wants to merge 9 commits into
mainfrom
automation/update-rust-analyzer/rust/update-workflow-4f7597f07f88ccf6
Open

paldepind wants to merge 9 commits into
mainfrom
automation/update-rust-analyzer/rust/update-workflow-4f7597f07f88ccf6

Conversation

@paldepind

@paldepind paldepind commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Updates rust-analyzer to version 0.0.357 in order to support Rust 1.99.

Note to reviewer:

  • The first 5 commits are created by the automated script and are standard.
  • The interesting things to review are:
    • The upgrade and downgrade scripts.
    • The changes to the models. Some things have been moved around inside the standard library, which caused some canonical paths to change. The models are now duplicated with both the old canonical path and the new one. We could delete the old ones, but then analysis quality would be reduced for older databases.

The DCA report shows some changes, but I don't think they're significant enough that we should worry about them. I might dig into them, but even if I find anything I think we should address that in follow up PRs.

Copilot AI balanced review requested due to automatic review settings October 7, 2026 11:23
@paldepind
paldepind requested review from a team as code owners October 7, 2026 11:23
Comment on lines +783 to +784
/**
*/
Comment on lines +808 to +809
/**
*/

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

One or more issues must be addressed before approval.

Review effort: Balanced
Findings: 2 High severity · 1 Low severity

Open (3)
What changed in this PR

Updates CodeQL’s Rust extractor to rust-analyzer 0.0.357 and exposes its new configuration-predicate AST nodes.

Changes:

  • Updates workspace dependencies, Bazel definitions, source archive, and fixed extraction toolchain.
  • Adds generated extraction, AST, and CFG interfaces for CfgPredExpr and CfgPredPat.
  • Adds schema migrations, a change note, test placeholders, and CodeQL setup for automation.
File Description
unified/​extractor/​Cargo.toml Updated as part of this pull request.
shared/​tree-sitter-extractor/​Cargo.toml Updated as part of this pull request.
rust/​scripts/​update_rust_analyzer.py Updated as part of this pull request.
rust/​schema/​ast.py Updated as part of this pull request.
rust/​ql/​test/​setup.sh Updated as part of this pull request.
rust/​ql/​test/​extractor-tests/​generated/​CfgPredPat/​MISSING_SOURCE.txt Updated as part of this pull request.
rust/​ql/​test/​extractor-tests/​generated/​CfgPredExpr/​MISSING_SOURCE.txt Updated as part of this pull request.
rust/​ql/​lib/​upgrades/​3af0bba56aa51dfb325939cc3b52cd0a3eb0965f/​upgrade.properties Updated as part of this pull request.
rust/​ql/​lib/​rust.dbscheme Updated as part of this pull request.
rust/​ql/​lib/​codeql/​rust/​elements/​internal/​generated/​SynthConstructors.qll Updated as part of this pull request.
rust/​ql/​lib/​codeql/​rust/​elements/​internal/​generated/​Synth.qll Updated as part of this pull request.
rust/​ql/​lib/​codeql/​rust/​elements/​internal/​generated/​Raw.qll Updated as part of this pull request.
rust/​ql/​lib/​codeql/​rust/​elements/​internal/​generated/​ParentChild.qll Updated as part of this pull request.
rust/​ql/​lib/​codeql/​rust/​elements/​internal/​generated/​CfgPredPat.qll Updated as part of this pull request.
rust/​ql/​lib/​codeql/​rust/​elements/​internal/​generated/​CfgPredExpr.qll Updated as part of this pull request.
rust/​ql/​lib/​codeql/​rust/​elements/​internal/​CfgPredPatImpl.qll Updated as part of this pull request.
rust/​ql/​lib/​codeql/​rust/​elements/​internal/​CfgPredPatConstructor.qll Updated as part of this pull request.
rust/​ql/​lib/​codeql/​rust/​elements/​internal/​CfgPredExprImpl.qll Updated as part of this pull request.
rust/​ql/​lib/​codeql/​rust/​elements/​internal/​CfgPredExprConstructor.qll Updated as part of this pull request.
rust/​ql/​lib/​codeql/​rust/​elements/​CfgPredPat.qll Updated as part of this pull request.
rust/​ql/​lib/​codeql/​rust/​elements/​CfgPredExpr.qll Updated as part of this pull request.
rust/​ql/​lib/​codeql/​rust/​elements.qll Updated as part of this pull request.
rust/​ql/​lib/​codeql/​rust/​controlflow/​internal/​generated/​CfgNodes.qll Updated as part of this pull request.
rust/​ql/​lib/​change-notes/​2026-10-07-rust-analyzer-0.0.357.md Updated as part of this pull request.
rust/​ql/​integration-tests/​conftest.py Updated as part of this pull request.
rust/​ql/​.gitattributes Updated as part of this pull request.
rust/​ql/​.generated.list Updated as part of this pull request.
rust/​extractor/​src/​translate/​generated.rs Updated as part of this pull request.
rust/​extractor/​src/​toolchain.rs Updated as part of this pull request.
rust/​extractor/​src/​generated/​top.rs Updated as part of this pull request.
rust/​extractor/​src/​generated/​.generated.list Updated as part of this pull request.
rust/​extractor/​Cargo.toml Updated as part of this pull request.
rust/​downgrades/​9487e73d9da6508522f07a34bc4aafa8d55c0f5f/​upgrade.properties Updated as part of this pull request.
rust/​downgrades/​9487e73d9da6508522f07a34bc4aafa8d55c0f5f/​downgrade.ql Updated as part of this pull request.
rust/​ast-generator/​Cargo.toml Updated as part of this pull request.
ruby/​extractor/​Cargo.toml Updated as part of this pull request.
MODULE.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​stdx/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​stdx-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​serde_with/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​serde_with-3.24.0/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​serde_with-3.23.0/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_vfs/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_vfs-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_toolchain/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_toolchain-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_syntax/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_syntax-bridge/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_syntax-bridge-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_syntax-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_syntax-0.0.352/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_stdx-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_stdx-0.0.352/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_span/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_span-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_span-0.0.352/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_project_model/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_project_model-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_paths/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_paths-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_paths-0.0.352/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_parser/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_parser-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_parser-0.0.352/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_load-cargo/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_load-cargo-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_intern/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_intern-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_intern-0.0.352/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_ide_db/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_ide_db-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_ide_db-0.0.352/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_hir/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_hir-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_hir_ty/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_hir_ty-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_hir_ty-0.0.352/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_hir_expand/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_hir_expand-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_hir_def/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_hir_def-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_cfg/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_cfg-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_base_db/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​ra_ap_base_db-0.0.357/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​lazy_static/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​lazy_static-1.5.1/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​either/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​either-1.19.0/​BUILD.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.tracing-flame-0.2.0.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.sharded-slab-0.1.7.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.serde_with-3.24.0.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.serde_with_macros-3.24.0.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.salsa-macros-0.28.5.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.salsa-macro-rules-0.28.5.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.salsa-0.28.5.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.rayon-1.12.0.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_vfs-notify-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_vfs-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_tt-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_toolchain-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_test_utils-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_test_fixture-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_syntax-bridge-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_syntax-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_stdx-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_span-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_project_model-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_profile-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_proc_macro_api-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_paths-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_parser-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_mbe-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_macros-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_load-cargo-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_intern-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_ide_db-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_hir-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_hir_ty-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_hir_expand-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_hir_def-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_edition-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_cfg-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.ra_ap_base_db-0.0.357.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.lazy_static-1.5.1.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.itertools-0.15.0.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.either-1.19.0.bazel Updated as part of this pull request.
misc/​bazel/​3rdparty/​tree_sitter_extractors_deps/​BUILD.bazel Updated as part of this pull request.
Cargo.lock Updated as part of this pull request.
.github/​workflows/​update-rust-analyzer.md Updated as part of this pull request.
.github/​workflows/​update-rust-analyzer.lock.yml Updated as part of this pull request.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +11 to +12
query predicate new_locatable_locations(Element id, Location location) {
locatable_locations(id, location) and not cfg_pred_exprs(id) and not cfg_pred_pats(id)
Comment on lines +4 to +7
cfg_pred_exprs.rel: delete
cfg_pred_expr_cfg_predicates.rel: delete
cfg_pred_pats.rel: delete
cfg_pred_pat_cfg_predicates.rel: delete
Comment thread rust/schema/ast.py
Comment on lines +189 to +193
class CfgPredExpr(Expr, ):
cfg_predicate: optional["CfgPredicate"] | child

class CfgPredPat(Pat, ):
cfg_predicate: optional["CfgPredicate"] | child
@github-actions github-actions Bot added documentation Ruby Rust Pull requests that update Rust code Unified labels Oct 7, 2026
@paldepind
paldepind marked this pull request as draft October 7, 2026 11:35
@paldepind
paldepind force-pushed the automation/update-rust-analyzer/rust/update-workflow-4f7597f07f88ccf6 branch 3 times, most recently from de28b14 to 043140e Compare October 9, 2026 07:43
github-actions Bot and others added 9 commits October 11, 2026 16:59
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9aa1104f-468b-4aa4-b605-e46c22c1e398
Add models for the alloc/core canonical I/O paths introduced by Rust 1.99. Regenerate the file, network, stdin, and cleartext logging expectations to restore the missing flows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9aa1104f-468b-4aa4-b605-e46c22c1e398
Rust 1.99 changed pin! to wrap its argument in PinMacroHelper and pass that wrapper through pin_new_unchecked_in_helper before constructing the Pin. Model value flow from the helper's value field to the returned Pin pointer and update the modeled-flow expectation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9aa1104f-468b-4aa4-b605-e46c22c1e398
@paldepind
paldepind force-pushed the automation/update-rust-analyzer/rust/update-workflow-4f7597f07f88ccf6 branch from 043140e to 34b3ec4 Compare October 11, 2026 15:04
@paldepind
paldepind marked this pull request as ready for review October 12, 2026 08:55

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Ruby Rust Pull requests that update Rust code Unified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants